package cn.edu.scnu.service;

import cn.edu.scnu.entity.Myorder;
import cn.edu.scnu.mapper.OrderMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Service
public class OrderSevice extends ServiceImpl<OrderMapper, Myorder> {
    @Resource
    private OrderMapper orderMapper;

    public List<Myorder> findOrdersByflowerId(String flowerid) {
        QueryWrapper<Myorder> queryWrapper=new QueryWrapper<>();
        queryWrapper.eq("flowerid",flowerid);
        return orderMapper.selectList(queryWrapper);
    }
}
